package com.example.mapper;

import com.example.entity.po.Employee;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import java.time.LocalDateTime;
import java.util.Date;


/**
 * @author hongyi
 * @date 2024/8/24 16:49
 */
@SpringBootTest
public class EmployeeMapperTest {

    @Autowired
    private EmployeeMapper employeeMapper;
    @Test
    public void insert() {
        Employee employee = new Employee();
         employee.setId(null);
         employee.setName("小绿");
         employee.setPosition("C#开发");
         employee.setHireDate(LocalDateTime.now());
         employee.setDeptId(1);
         employee.setSex(2);
        int insert = employeeMapper.insert(employee);
        System.out.println("插入成功: " + insert);
    }
}
